<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>vv-bind直接绑定对象(掌握)</title> 
</head>
<body>
  <div id="app">
    <h2 :name="name" :age="age" :height="height"> 以前的写法 </h2> 
    <!-- 1. v-bind绑定对象, 给组件传递参数-->
    <h2 v-bind="infos"> 直接绑定对象 </h2>
  </div>
  
  <script src="../lib/vue.js"></script>
  <script>
    // 使用vue
    const app = Vue.createApp({
      data: function(){
        return {
          infos: {
            name: "aa"
            , age: 18
            , height: 1.88
          }
          , name: "aa"
          , age: 18
          , height: 1.88
        }
      }
      ,methods: {
      }
    }
    )
    // 挂载 
    app.mount("#app")

    const obj = {
      // name-abc: "30px" 这是不允许的
      'name-abc': ""
    }
    
  </script>

</body>
</html>
